const gin_context = require("@/utils/gin_context");
const commentService = require("@/server/comment");
const { successData, sendCode } = require("@/utils/r/result");

const comment = {
  async GetList(req, res) {
    // const { page_size, page_num } = gin_context.CheckQueryPage(
    //   req.query.page_size,
    //   req.query.page_num
    // );
    successData(res, await commentService.GetList(req.query));
  },
  async UpdateReview(req, res) {
    sendCode(res, await commentService.UpdateReview(req.body));
  },
  async Delete(req, res) {
    sendCode(res, await commentService.Delete(req.body));
  },
};

module.exports = comment;
